package cn.com.yusys.yusp.mobile.web.rest;

import cn.com.yusys.yusp.commons.mapper.QueryModel;
import cn.com.yusys.yusp.commons.web.rest.dto.ResultDto;
import cn.com.yusys.yusp.mobile.service.OcrmSMSModelInfoService;
import cn.com.yusys.yusp.mobile.service.OutStandingAchievementService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * 今日业绩
 * @author zoie
 */
@RestController
@RequestMapping("/mobile/outStandingAchievement")
public class OutStandingAchievementResource {

    @Resource
    private OutStandingAchievementService outStandingAchievementService;

    /**
     * 今日业绩三条
     * @param queryModel
     * @return
     */
    @GetMapping("/queryAchievementTop3")
    @ApiOperation(value = "今日业绩TOP3", notes = "今日业绩TOP3")
    public ResultDto<List<Map<String,Object>>> queryAchievementTop3(QueryModel queryModel) {
        List<Map<String,Object>> list  = outStandingAchievementService.queryAchievementTop3(queryModel);
        return new ResultDto<>(list);
    }
    /**
     * 今日业绩列表
     * @return
     */
    @GetMapping("/queryAchievementList")
    @ApiOperation(value = "今日业绩列表", notes = "今日业绩列表")
    public ResultDto<List<Map<String,Object>>> queryAchievementList(QueryModel queryModel) {
        List<Map<String,Object>> list  = outStandingAchievementService.queryAchievementList(queryModel);
        return new ResultDto<>(list);
    }

    /**
     * 绩效统计
     * @param queryModel
     * @return
     */
    @GetMapping("/queryBusiRank")
    @ApiOperation(value = "绩效统计", notes = "绩效统计")
    public ResultDto<Map<String,Object>> queryBusiRank(QueryModel queryModel) {
        Map<String,Object> map  = outStandingAchievementService.queryBusiRank(queryModel);
        return new ResultDto<>(map);
    }

    /**
     * 龙虎榜
     * @param queryModel
     * @return
     */
    @GetMapping("/queryRankList")
    @ApiOperation(value = "龙虎榜", notes = "龙虎榜")
    public ResultDto<List<Map<String,Object>>> queryRankList(QueryModel queryModel) {
        List<Map<String,Object>> list  = outStandingAchievementService.queryRankList(queryModel);
        return new ResultDto<>(list);
    }
}